The present invention is generally directed to synchronization of clocks, and more particularly to synchronization of clocks in a packet-switched communication network.
Clock synchronization is important in many automated electronic systems. Many automated electronic systems use Ethernet as a communication medium because of its ease of installation and low cost. In such systems, it may be advantageous for devices in the network to have a common base time. The common base time may be used, for example, to trigger coordinated measurement instances in a network of sensors, to coordinate actions of controllers in an industrial system, or to synchronize clocks of mobile/cellular radio base stations. In addition to sensors, controllers, and radio base stations, the system may include computers and communication devices, such as routers.
The Precision Time Protocol (PTP) is designed to synchronize clocks across packet based networks. PTP allows for synchronization of distributed clocks to sub-microsecond accuracy. PTP relies on a measurement of the communication path delay between a source and a receiver. Preferably, the precise moments of transmitting and receiving a message are measured for a message transaction. Messages including the current time information may then be adjusted to account for the determined path delay. The path delay measurement may be determined based on the timing of a sync message and a delay request. The average path delay of the two messages gives the one way delay, if for example the path delay is symmetric in both directions. Unfortunately, the path delay may not be symmetric in both directions, and variable latencies within any particular path may also result in variability in path delays.